package day0225;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        //生成两个随机数
        int num1= (int)(Math.random()*100);
        int num2= (int)(Math.random()*100);
        String mathExpression = Test4.method3(num1,num2);
        System.out.println(mathExpression);
    }

    static String method3(int n1, int n2) {
        int n=(int)(Math.random()*5);//[0,4]
        switch (n){
            case 0: return n1+ "+" + n2  +"=";
            case 1: return n1+ "-" + n2  +"=";
            case 2: return n1+ "*" + n2  +"=";
            case 3: return n1+ "/" + n2  +"=";
            case 4: return n1+ "%" + n2  +"=";
            default:   return "";
        }
    }




    static boolean method2(int n1,  int n2){
        System.out.println("请输入"+n1+"%"+n2+"的结果：");
        int answer=new Scanner(System.in).nextInt();
        return   n1%n2  ==  answer;
    }






    static boolean method1(int n1,  int n2){
        System.out.println("请输入"+n1+"-"+n2+"的结果：");
        int answer=new Scanner(System.in).nextInt();
        return   n1-n2  ==  answer;
    }
}
